Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newsfeed app react #69

Closed
wants to merge 4 commits into from

Conversation

vardhanapoorv
Copy link

React app live newsfeed using Ably publish, subscribe and channel occupancy events

Copy link
Member

@Srushtika Srushtika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few changes requested, otherwise looks great!

@@ -0,0 +1,1623 @@
This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps it's worth getting rid of the unnecessary information and links here wrt the current project. A single link to the main website should be enough so anyone looking for more info can find it there? It would in fact be worth adding the details of the main app and its functionality in the README instead, which I think is currently missing.

}

const myId = "id-" + Math.random().toString(36).substr(2, 16);
const apiKey = 'JAofug.wynVXg:YU-Tf_OcO7Jz_UIK';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is never recommended to include the API key in GitHub commits. This will need to go, I perhaps should explicitly mention it in the guide. Please see other tutorials, they have a placeholder like '' in place of the actual API key that they are expected to replace with their own key. I'm afraid it'll mean you'll need to raise a new PR with the step-wise commits again.

clientId: myId,
echoMessages: false
});
const chatChannel = ably.channels.get("chat");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add some helpful comments throughout your code? If anyone were to look at the source code directly, they should still be able to infer what's happening. As you'll be making a new PR anyway, adding comments in all (commit) steps shouldn't be an issue.

import React, { useState, useEffect } from "react";
import * as Ably from 'ably';
import { Container, Header, Divider, Button, Form, TextArea } from 'semantic-ui-react'
import React, { useState, useEffect, useRef } from "react";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, these fixes can now be done in the second step when you make the new PR?

"https://cdn.glitch.com/0bff6817-d500-425d-953c-6424d752d171%2Favatar_1.png?1536042516362",
"https://cdn.glitch.com/0bff6817-d500-425d-953c-6424d752d171%2Favatar_4.png?1536042516573",
"https://cdn.glitch.com/0bff6817-d500-425d-953c-6424d752d171%2Favatar_5.png?1536042517889"
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

function getRandomArbitrary(min, max) {
return Math.floor(Math.random() * (max - min) + min);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above for the general indentation and formatting issues.

@Srushtika
Copy link
Member

Srushtika commented Sep 13, 2019

Closing this as a new PR was opened: #71

@Srushtika Srushtika closed this Sep 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants